import { Source, Meta } from '@storybook/blocks';

<Meta title="HOOKS/useHass/getAllEntities" />

# getAllEntities()

This will return every entity available in your home assistant instance as an object with the entity id as the key prefixed with the domain associated with it.

### Definition
<Source dark language="ts" code={`getAllEntities()`} />


### Example Usage

```ts
function GetEntitiesExample() {
  const { getAllEntities } = useHass();
  const entities = getAllEntities();
  return <p>You have {Object.keys(entities).length} entities</p>
}
